package com.xsh.gls.service.impl;

import com.xsh.gls.mapper.YconMapper;
import com.xsh.gls.pojo.Ycon;
import com.xsh.gls.service.YconService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shkstart
 * @date 2019/1/25 - 17:12
 */
@Service
public class YconServiceImpl implements YconService {

    @Autowired
    private YconMapper yconMapper;


    @Override
    public Ycon getByYconId(Integer yconId) {
        return yconMapper.getByYconId(yconId);
    }

    @Override
    public boolean insertSelective(Ycon ycon) {
        boolean flag = false;
        if (yconMapper.insertSelective(ycon) > 0) {
            flag = true;
        }
        return flag;

    }

    @Override
    public int  add(Ycon ycon) {
       return yconMapper.add(ycon);
    }

    @Override
    public boolean deleteByYconid(Integer yconId) {
        boolean flag = false;
        if (yconMapper.deleteByYconid(yconId)>0){
            flag = true;
        }
        return flag;
    }
}
